package com.geeka.d12.work.chatroom;

import java.io.PrintWriter;
import java.security.PrivateKey;
import java.util.Scanner;

public class ClientOutputThread extends Thread{
    private Scanner scan;
    private PrintWriter pw;

    public ClientOutputThread(Scanner scan, PrintWriter pw) {
        this.scan = scan;
        this.pw = pw;
    }

    @Override
    public void run() {

        while (true){
            System.out.println("请输入信息:  ");
            String next = scan.next();
            pw.println(next); // 输出到服务端
            pw.flush();

//                System.out.println(br.readLine());
        }
    }
}
